#ifndef RRMATH_H
#define RRMATH_H

class RRRange
{
public:
    double s, t;
};

class RRVec3
{
public:
    double x, y, z;
};

class RRVec4
{
public:
    double x, y, z, w;
};

RRVec3 RRNormalize(RRVec3 arg);
RRVec3 RRCrossProduct(RRVec3 v1, RRVec3 v2);
double RRInnerProduct(RRVec3 v1, RRVec3 v2);
void RRMatrixProduct3f(RRVec3 m1[], RRVec3 m2[], RRVec3 m[]);
void RRMatVecProduct3f(RRVec3 m1[], RRVec3 m2, RRVec3 *m);
RRVec3 RRSetVec3(double x, double y, double z);
void RRClampVec3(RRVec3 *arg, double low, double up);
double RRDistance(RRVec3 src, RRVec3 dest);

RRVec4 RRSetVec4(double x, double y, double z, double w);
void RRClampVec4(RRVec4 *arg, double floor, double ceil);

template <class T>
inline const T& max(const T& a, const T& b);
template <class T>
inline const T& min(const T& a, const T& b);
#endif // RRMATH_H
